//
//  TestProblem1619.swift
//  LeetCodeTests
//
//  Created by 武侠 on 2023/6/25.
//  Copyright © 2023 zhulongiMac02. All rights reserved.
//


import XCTest
@testable import LeetCode

final class TestProblem1619: XCTestCase {

    var problem = Problem1619()
    
    override func setUp() {
        super.setUp()
        // Put setup code here. This method is called before the invocation of each test method in the class.
    }
    
    override func tearDown() {
        // Put teardown code here. This method is called after the invocation of each test method in the class.
        super.tearDown()
    }
    
    // MARK: - 排序
    func testProblem1619_Case1() throws {
        XCTAssertEqual(problem.trimMean([1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3]), 2.0)
    }
    
    func testProblem1619_Case2() throws {
        XCTAssertEqual(problem.trimMean([6,2,7,5,1,2,0,3,10,2,5,0,5,5,0,8,7,6,8,0]), 4.0)
    }
    
    func testProblem1619_Case3() throws {
        XCTAssertEqual(problem.trimMean([6,0,7,0,7,5,7,8,3,4,0,7,8,1,6,8,1,1,2,4,8,1,9,5,4,3,8,5,10,8,6,6,1,0,6,10,8,2,3,4]), 4.77778)
    }
    
    func testProblem1619_Case4() throws {
        XCTAssertEqual(problem.trimMean([9,7,8,7,7,8,4,4,6,8,8,7,6,8,8,9,2,6,0,0,1,10,8,6,3,3,5,1,10,9,0,7,10,0,10,4,1,10,6,9,3,6,0,0,2,7,0,6,7,2,9,7,7,3,0,1,6,1,10,3]), 5.27778)
    }
    
    func testProblem1619_Case5() throws {
        XCTAssertEqual(problem.trimMean([4,8,4,10,0,7,1,3,7,8,8,3,4,1,6,2,1,1,8,0,9,8,0,3,9,10,3,10,1,10,7,3,2,1,4,9,10,7,6,4,0,8,5,1,2,1,6,2,5,0,7,10,9,10,3,7,10,5,8,5,7,6,7,6,10,9,5,10,5,5,7,2,10,7,7,8,2,0,1,1]), 5.29167)
    }
    
    func testProblem1619_Case6() throws {
        XCTAssertEqual(problem.trimMean([77014,31380,71838,27969,33049,3898,67868,64702,53537,52816,17519,28838,59051,13230,73001,33827,32240,46354,8855,30273,39390,86556,50290,16477,99563,44257,7351,81523,63513,82380,29575,41828,51542,2780,54375,28881,64406,61289,80186,54848,39868,3835,57351,80742,87340,87345,52223,32533,79419,78700,53644,55640,77066,48359,87122,13696,64113,94355,37562,14690,4705,50581,88483,84764,69135,84169,91375,85633,15406,17388,25798,27145,96021,32339,92062,60871,46661,87201,31021,61525,58445,9696,57520,78762,24725,17911,9614,99570,81627,53031,61386,97294,30116,38049,80132,75757,11685,61802,21344,34914]), 51779.58889)
    }
    
}
